/*
 * Copyright (C) 2016 yixun All Rights Reserved.
 * 
 * CustomerDto.java
 */
package com.emm.yixun.common.model.dto;

import java.util.Date;
import java.util.LinkedList;
import java.util.List;

import com.emm.yixun.common.app.servletentity.FamilyMemberListReq;
import com.emm.yixun.common.model.Customer;

/**
 * [文件名称]<br>
 * CustomerDto.java<br>
 * <br>
 * [文件描述]<br>
 * 客户信息表 数据辅助类<br>
 * <br>
 * [修改记录]<br>
 * 2016-05-11 11:27:13 创建 陶俊代码生成器<br>
 * 
 * @author 陶俊代码生成器
 * @version 1.00
 */
public class CustomerDto extends Customer {
	private static final long serialVersionUID = 1L;
	/**
	 * 需要正序字段名
	 */
	private List<String> asc;
	/**
	 * 需要逆序字段名
	 */
	private List<String> desc;
	/**
	 * 排序SQL
	 */
	private String orders;

	private String gridJson;
	private String gridJson2;
	private String gridJson3;
	private String gridJson4;
	private String ftContactTimes;
	private String lastFollowTimes;
	private Long userId;
	private String newSalesGroupId;
	private String birth; //查询生日
	private String weddingDate; //查询纪念日
	private String diffDay; //返回生日相隔天数
	private String diffWeddingDay; //返回纪念日相隔天数
	 //电话集合
    private List<String> phoneList;
	
	public String getBirth() {
		return birth;
	}

	public void setBirth(String birth) {
		this.birth = birth;
	}

	public String getWeddingDate() {
		return weddingDate;
	}

	public void setWeddingDate(String weddingDate) {
		this.weddingDate = weddingDate;
	}

	public String getDiffDay() {
		return diffDay;
	}

	public void setDiffDay(String diffDay) {
		this.diffDay = diffDay;
	}

	public String getDiffWeddingDay() {
		return diffWeddingDay;
	}

	public void setDiffWeddingDay(String diffWeddingDay) {
		this.diffWeddingDay = diffWeddingDay;
	}

	public String getLastFollowTimes() {
		return lastFollowTimes;
	}

	public void setLastFollowTimes(String lastFollowTimes) {
		this.lastFollowTimes = lastFollowTimes;
	}

	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	/**
	 * 名称：户型Id 描述： 关注户型
	 **/
	private List<String> houseTypeList;
	/**
	 * 名称：组团Id 描述： 意向组团
	 **/
	private List<String> premisesList;
	/**
	 * 名称：房间Id 描述： 意向房源
	 **/
	private List<String> roomList;

	/**
	 * 家庭成员列表
	 */
	private List<FamilyMemberListReq> familyMemberList;

	/**
	 * 家庭成员列表
	 */
	private List<FamilyMemberModel> familyMemberLists;

	public List<FamilyMemberModel> getFamilyMemberLists() {
		return familyMemberLists;
	}

	public void setFamilyMemberLists(List<FamilyMemberModel> familyMemberLists) {
		this.familyMemberLists = familyMemberLists;
	}

	public List<String> getHouseTypeList() {
		return houseTypeList;
	}

	public void setHouseTypeList(List<String> houseTypeList) {
		this.houseTypeList = houseTypeList;
	}

	public List<String> getPremisesList() {
		return premisesList;
	}

	public void setPremisesList(List<String> premisesList) {
		this.premisesList = premisesList;
	}

	public List<String> getRoomList() {
		return roomList;
	}

	public void setRoomList(List<String> roomList) {
		this.roomList = roomList;
	}

	public List<FamilyMemberListReq> getFamilyMemberList() {
		return familyMemberList;
	}

	public void setFamilyMemberList(List<FamilyMemberListReq> familyMemberList) {
		this.familyMemberList = familyMemberList;
	}

	public String getFtContactTimes() {
		return ftContactTimes;
	}

	public void setFtContactTimes(String ftContactTimes) {
		this.ftContactTimes = ftContactTimes;
	}

	public String getGridJson() {
		return gridJson;
	}

	public void setGridJson(String gridJson) {
		this.gridJson = gridJson;
	}

	public String getGridJson2() {
		return gridJson2;
	}

	public void setGridJson2(String gridJson2) {
		this.gridJson2 = gridJson2;
	}

	public String getGridJson3() {
		return gridJson3;
	}

	public void setGridJson3(String gridJson3) {
		this.gridJson3 = gridJson3;
	}

	public String getGridJson4() {
		return gridJson4;
	}

	public void setGridJson4(String gridJson4) {
		this.gridJson4 = gridJson4;
	}

	/**
	 * 添加需要正序字段名
	 */
	public void addAsc(String col) {
		if (asc == null) {
			asc = new LinkedList<String>();
		}
		asc.add(col);
	}

	/**
	 * 清空需要正序字段名
	 */
	public void cleanAsc() {
		asc = null;
	}

	/**
	 * 添加需要逆序字段名
	 */
	public void addDesc(String col) {
		if (desc == null) {
			desc = new LinkedList<String>();
		}
		desc.add(col);
	}

	/**
	 * 清空需要逆序字段名
	 */
	public void cleanDesc() {
		desc = null;
	}

	/**
	 * 如果排序SQL为空根据需要正逆序的字段名拼接排序SQL
	 */
	public String getOrders() {
		StringBuilder orderStr = null;
		StringBuilder ascStr;
		StringBuilder descStr;
		if (orders == null) {
			if (asc != null) {
				ascStr = new StringBuilder();
				orderStr = new StringBuilder();
				String pex = "";
				for (String a : asc) {
					ascStr.append(pex + a);
					pex = ",";
				}
				orderStr.append(ascStr.toString() + " ASC");
			}
			if (desc != null) {
				descStr = new StringBuilder();
				String pex = "";
				for (String d : desc) {
					descStr.append(pex + d);
					pex = ",";
				}
				if (orderStr == null) {
					orderStr = new StringBuilder();
					orderStr.append(descStr.toString() + " DESC");
				} else {
					orderStr.append("," + descStr.toString() + " DESC");
				}
			}
			orders = orderStr != null ? orderStr.toString() : null;
		}

		return orders;
	}

	/**
	 * 设置排序SQL
	 */
	public void setOrders(String orders) {
		this.orders = orders;
	}

	private Date peWeddingDateBefore;
	private Date peWeddingDateAfter;
	private Date updateTimeBefore;
	private Date updateTimeAfter;
	private Date createTimeBefore;
	private Date createTimeAfter;
	private Date ftContactTimeBefore;
	private Date ftContactTimeAfter;
	private Date lastFollowTimeBefore;
	private Date lastFollowTimeAfter;
	// 会员条件过滤
	private String customerCondition;

	public Date getPeWeddingDateBefore() {
		return this.peWeddingDateBefore;
	}

	public void setPeWeddingDateBefore(Date peWeddingDateBefore) {
		this.peWeddingDateBefore = peWeddingDateBefore;
	}

	public Date getPeWeddingDateAfter() {
		return this.peWeddingDateAfter;
	}

	public void setPeWeddingDateAfter(Date peWeddingDateAfter) {
		this.peWeddingDateAfter = peWeddingDateAfter;
	}

	public Date getUpdateTimeBefore() {
		return this.updateTimeBefore;
	}

	public void setUpdateTimeBefore(Date updateTimeBefore) {
		this.updateTimeBefore = updateTimeBefore;
	}

	public Date getUpdateTimeAfter() {
		return this.updateTimeAfter;
	}

	public void setUpdateTimeAfter(Date updateTimeAfter) {
		this.updateTimeAfter = updateTimeAfter;
	}

	public Date getCreateTimeBefore() {
		return this.createTimeBefore;
	}

	public void setCreateTimeBefore(Date createTimeBefore) {
		this.createTimeBefore = createTimeBefore;
	}

	public Date getCreateTimeAfter() {
		return this.createTimeAfter;
	}

	public void setCreateTimeAfter(Date createTimeAfter) {
		this.createTimeAfter = createTimeAfter;
	}

	public Date getFtContactTimeBefore() {
		return this.ftContactTimeBefore;
	}

	public void setFtContactTimeBefore(Date ftContactTimeBefore) {
		this.ftContactTimeBefore = ftContactTimeBefore;
	}

	public Date getFtContactTimeAfter() {
		return this.ftContactTimeAfter;
	}

	public void setFtContactTimeAfter(Date ftContactTimeAfter) {
		this.ftContactTimeAfter = ftContactTimeAfter;
	}

	public Date getLastFollowTimeBefore() {
		return lastFollowTimeBefore;
	}

	public void setLastFollowTimeBefore(Date lastFollowTimeBefore) {
		this.lastFollowTimeBefore = lastFollowTimeBefore;
	}

	public Date getLastFollowTimeAfter() {
		return lastFollowTimeAfter;
	}

	public void setLastFollowTimeAfter(Date lastFollowTimeAfter) {
		this.lastFollowTimeAfter = lastFollowTimeAfter;
	}

	public String getCustomerCondition() {
		return customerCondition;
	}

	public void setCustomerCondition(String customerCondition) {
		this.customerCondition = customerCondition;
	}

	/************ 扩展字段 **********/
	private String searchContent;
	private String dataPermission;

	public String getSearchContent() {
		return searchContent;
	}

	public void setSearchContent(String searchContent) {
		this.searchContent = searchContent;
	}

	public String getDataPermission() {
		return dataPermission;
	}

	public void setDataPermission(String dataPermission) {
		this.dataPermission = dataPermission;
	}

	public String getNewSalesGroupId() {
		return newSalesGroupId;
	}

	public void setNewSalesGroupId(String newSalesGroupId) {
		this.newSalesGroupId = newSalesGroupId;
	}

	public List<String> getPhoneList() {
		return phoneList;
	}

	public void setPhoneList(List<String> phoneList) {
		this.phoneList = phoneList;
	}

}
